![]() |
last modified July 23, 2000 This page is black and white for easy printing. |
| Index | |
| Introduction | |
| Requirements | |
|
|
| index | |
| Sample .FLAs | |
|
|
| index | |
| How SWfX Works | |
| Wildform SWfX Text Effects plugin are essentially specially constucted Flash Movies (SWF files) which tell SWfX how to render the effect. The only tools required to create these Plugin movies is Macromedia Flash 4 and this developers kit. This document will describe how to create these special Flash movies. | |
| index | |
| SWF versions | |
The Macromedia Flash 4 authoring program is required to create text effects. The output text effects have to be exported as a FlashPlayer 4 movie (SWF) for it to be used by SWfX. However, SWfX allows for certain text effects to be saved as Flash 3 movies. The SWF 3 compatible movies are generally simple text effects which don't use any special features available only in Flash 4. Effects that can be exported as SWF 3 movies may also be exported as SWF 4 movies. Exporting SWF 3 compatible movies as SWF 4 generally results in a smaller file size since SWfX renders the text effect with certain Flash 4 only features to minimize file size. A properly constructed Flash 3 compatible effect should render exactly the same regardless of the format it is saved in. Flash 4 only effects allow for more complicated effects than Flash 3 compatible effects since the SWF 4 format offers more features than the SWF 3 format. Features that Flash 4 only plugins offer are:
|
|
| index | |
| Layout of Plugin Flash Movie | |
| Each plugin effect has to be created following a specific layout otherwise, it is considered an invalid plugin and will fail to function as expected in SWfX. A good idea is to follow a template when creating your own text effects. Just change the variables and the various motion tweens, keyframes, and ActionScripts to suit your design. | |
![]() |
|
| The specification requires that the main timeline of the Flash movie have only one frame containing an "effect" movie clip and a set of Frame Actions: | |
| index | |
| Main Timeline Frame Actions | |
![]() |
|
| The frame actions are composed of "SetVariable" actions which describe the plugin and contain metadata for SWfX to interpret. Essentially, the variables defined in the first frame of the movie contain "processing instructions" and meta-data. The following variables are currently the ONLY processing instructions supported by SWfX (case sensitive): | |
Set Variable: "name" = "Pop Big"
"SWFX_PLUGIN_1" is the only supported value. This variable must be set to "SWFX_PLUGIN_1", otherwise the effect is invalid and will not be loaded by SWfX.
Ex: Set Variable: "type" = "SWFX_PLUGIN_1"
4. Set to 3 for Flash 3 compatable effects or 4 for Flash 4 effects. This variable requires a value or assumes that this effect is safe in the Flash 3 player. See "SWF Versions" for more information.
Ex: Set Variable: "version" = 4
Ex: Set Variable: "author" = "Wildform Inc."
Ex: Set Variable: "URL" = "http://www.wildswfx.com"
Ex: Set Variable: "Notes" = "Wildform SWfX effects plugin demonstration."
|
|
Other instructions for the movie may also be set. For example, we encourage the developer to "STOP" the effect at the first frame, so when it it loaded into the SWfX user interface, the effect will not consume system resources animating off screen. Because Wildform uses Flash as a user interface, this is an important issue for the proper performance of SWfX. We recommend placing the following ActionScript into the plugin before exporting the effect for use in SWfX:
Begin Tell Target ("effect")
Stop
End Tell Target
This will stop the animation of the "effect" movie clip, which defines the actual transformations to apply to text in SWfX. |
|
| index | |
| The "effect" Movie Clip | |
| The "effect" movie clip is the effect component of a plugin. The developer designs and animates the desired behavior of the plugin within the "effect" movieclip. The movieclip must be given an instance name of "effect" otherwise SWfX will complain that it "Couldn't find Effect Sprite" and will not render the effect. | |
![]() |
|
| The "effect" movieclip can contain almost any action, transformation, tween, etc. that Flash supports. The Flash 4 features that SWfX doesn't support are: | |
|
|
| In the "effect" movie clip, place the "letter" movie clip and apply any transformation to the "letter" movie clip. When SWfX uses a plugin to render an effect, it applies all the transformations applied in the "effect" movie clip to the "letter" movie clip. The "letter" movie clip serves as a placeholder for each character in a given text string when an effect is output by SWfX. Any item can be placed into the "effect" movie clip, such as masks, gradients, lines and fills, and Action Script; SWfX will apply everything in the movie clip to each character in a given text string. | |
If the transformation in an effect is not a simple key frame -to- key frame tween or chained tweens, then the "version" variable in the main timeline must be set to "4" (Ex: Set Variable: "version" = 4) otherwise undefined behavior may occur. |
|
| Simple Tween | |
| Chained Tween | |
| index | |
| The "letter" Movie Clip | |
| The "letter" movie clip is a placeholder for characters in effects. It provides the developer with a visual representation of the text effect and its animation within the Flash 4 environment. The "letter" movie clip is then animated and transformed through the "effect" sprite. | |
The "letter" movie clip should only contain and Editable Text field centered at the origin of the "letter" movie clip. Set the "variable name" of the text field to text, check "Disable Selection" and check "Disable Editing". Uncheck all the other options. For outline options, select "Include only specified font outlines" and check "Characters". In the "Characters" edit box, enter a capital "W". The capital "W" should be used since it the glyph with the greatest advance in almost all latin fonts and will provide the developer with an accurate representation of orientation and skew while designing the effect. It's important to ensure that the edit textbox is the only symbol in the "letter" clip. |
|
| The "letter" Movie Clip | |
![]() |
|
| Options for the Edit Textbox | |
![]() |
|
| index | |
| Exporting Your Effect | |
| Once all the meta data has been set and the developer is satisfied with the results of the effect, the plugin can be installed for use in SWfX. Export the plugin movie from the Flash 4 authoring tool as a Flash 4 movie. You may choose to "Protect" the movie if you wish and SWfX will still read the plugin properly. Flash 4 doesn't import SWF 4 movies properly anyway, so the "protect" switch is redundant. However, future versions of Macromedia Flash may be able to import SWF 4 files properly. The choice is irrelevant to SWfX. | |
Export the ".SWF" file from Flash 4 and copy the output file to your effects directory. The effects directory is a subdirectory of the directory SWfX was installed in. The default path is C:\Program Files\Wildform\SWfX. In the SWfX directory, you will find the effects directory. Start SWfX so it recognizes the effect. If the effect was structured properly, then the description will appear in SWfX and you can test your new creation. Restarting SWfX is only necessary if you add or remove effects from the effects directory, otherwise if you update an effect that you're creating by overwriting an older version of the effect in the effects directory, the new effect will be used for the preview or saving. |
|
![]() |
|
| index | |
| Action Script in Effects | |
| Flash 4 movie clips loop by default, so an effect output as Flash 4 will repear the text effect forever since the movie clip loops to the first frame by default. If the effect is supposed to stop at the end, then place a "Stop" action script in the last frame of the "effect" movie clip. When SWfX encounters this instruction, it creates output that will prevent the animation from looping. Action script may be used to determine the animation of the effect, including stopping the movie clip if a certain expression is true or false. | |
When the effect is output, a unique index is assigned to each character in a given text string. The first character is at index zero, second character is at index 1, etc. Action script can be used to determine this index. The _name of the "effect" clip is the character index assigned to each character in a string. Ex: Set Variable: "index" = GetProperty("", _name). In addition, the total number of characters rendered in this effect is placed in the variable textlen in the output movie's main timeline. Ex: Set Variable: "numChars" = /:textlen or Set Variable: "numChars" = ../:textlen. |
|
| Action script can be used to change the flow of animation in a text effect. It can be used to jump to different frames in an effect at any point of the movie's playback or depending on a condition. Finally, action script can be used to control other symbols in the "effect" movie clip. | |
| index | |
| ©2000 Wildform, Inc. | |